package com.ruoyi.asms.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ruoyi.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 故障处理阶段信息对象 asms_fault_resolve_stage
 *
 * @author yfkj
 * @date 2021-10-21
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class AsmsFaultResolveStage {
    private static final long serialVersionUID = 1L;
    /**
     * 故障处理阶段信息主键
     */
    @TableField(exist = true)
    @TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "${comment}")
    private Long faultResolveStageId;

    /**
     * 故障外键
     */
    @Excel(name = "故障外键")
    @TableField(exist = true)
    @ApiModelProperty(value = "故障外键")
    private Long faultAssetId;

    /**
     * 开始时间
     */
    @Excel(name = "开始时间")
    @TableField(exist = true)
    @ApiModelProperty(value = "开始时间")
    private Long startTime;

    /**
     * 结束时间
     */
    @Excel(name = "结束时间")
    @TableField(exist = true)
    @ApiModelProperty(value = "结束时间")
    private Long endTime;

    /**
     * 售后维护人
     */
    @Excel(name = "售后维护人")
    @TableField(exist = true)
    @ApiModelProperty(value = "售后维护人")
    private Long faultResolveUserId;

    /**
     * 售后维护公司(冗余设计)
     */
    @Excel(name = "售后维护公司(冗余设计)")
    @TableField(exist = true)
    @ApiModelProperty(value = "售后维护公司(冗余设计)")
    private Long maintenanceDeptId;

    /**
     * 设备故障原因
     */
    @Excel(name = "设备故障原因")
    @TableField(exist = true)
    @ApiModelProperty(value = "设备故障原因ID")
    private Long assetFaultReasonId;

    /**
     * 故障原因补充
     */
    @Excel(name = "故障原因补充")
    @TableField(exist = true)
    @ApiModelProperty(value = "故障原因")
    private String assetFaultReason;

    /**
     * 故障解决办法
     */
    @Excel(name = "故障解决办法")
    @TableField(exist = true)
    @ApiModelProperty(value = "故障解决办法")
    private String assetFaultSolution;

    /**
     * 费用
     */
    @Excel(name = "费用")
    @TableField(exist = true)
    @ApiModelProperty(value = "费用")
    private Long expense;

    /**
     * 费用信息
     */
    @Excel(name = "费用信息")
    @TableField(exist = true)
    @ApiModelProperty(value = "费用信息")
    private String expenseInfo;

    /**
     * 相关附件
     */
    @Excel(name = "相关附件")
    @TableField(exist = true)
    @ApiModelProperty(value = "相关附件")
    private String attachments;

    /**
     * 相关图片
     */
    @Excel(name = "相关图片")
    @TableField(exist = true)
    @ApiModelProperty(value = "相关图片")
    private String images;

    /**
     * 故障类型(1硬件、2软件、3其他)
     */
    @Excel(name = "故障类型(1硬件、2软件、3其他)")
    @TableField(exist = true)
    @ApiModelProperty(value = "故障类型(1硬件、2软件、3其他)")
    private Integer faultType;

    /**
     * 解决方式(1现场解决、2远程解决)
     */
    @Excel(name = "解决方式(1现场解决、2远程解决)")
    @TableField(exist = true)
    @ApiModelProperty(value = "解决方式(1现场解决、2远程解决)")
    private Integer resolveType;

    /**
     * 状态(-2未成功解决，-1退回或转让，0正在处理中，1处理结束)
     */
    @Excel(name = "状态(-2未成功解决，-1退回或转让，0正在处理中，1处理结束)")
    @TableField(exist = true)
    @ApiModelProperty(value = "状态(-2未成功解决，-1退回或转让，0正在处理中，1处理结束)")
    private Integer status;

    /**
     * 预计维修时间
     */
    @Excel(name = "预计维修时间")
    @TableField(exist = true)
    @ApiModelProperty(value = "预计维修时间")
    private Long estimateFixTime;

    /**
     * 是否延后处理（0是，1否）
     */
    @Excel(name = "是否延后处理（0是，1否）")
    @TableField(exist = true)
    @ApiModelProperty(value = "是否延后处理（0是，1否）")
    private Integer isDelayResolve;

    /**
     * 延后处理天数
     */
    @Excel(name = "延后处理天数")
    @TableField(exist = true)
    @ApiModelProperty(value = "延后处理天数")
    private Integer delayDayNum;

    /**
     * 延后处理原因
     */
    @Excel(name = "延后处理原因")
    @TableField(exist = true)
    @ApiModelProperty(value = "延后处理原因")
    private String delayReason;

    /**
     * 经度
     */
    @Excel(name = "经度")
    @TableField(exist = true)
    @ApiModelProperty(value = "经度")
    private Double longitude;

    /**
     * 纬度
     */
    @Excel(name = "纬度")
    @TableField(exist = true)
    @ApiModelProperty(value = "纬度")
    private Double latitude;

    /**
     * 备注
     */
    @Excel(name = "备注")
    @TableField(exist = true)
    @ApiModelProperty(value = "备注")
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty(value = "故障资产名称")
    private String faultAssetName;

    public static final String FAULT_RESOLVE_STAGE_ID = "fault_resolve_stage_id";
    public static final String FAULT_ASSET_ID = "fault_asset_id";
    public static final String START_TIME = "start_time";
    public static final String END_TIME = "end_time";
    public static final String FAULT_RESOLVE_USER_ID = "fault_resolve_user_id";
    public static final String MAINTENANCE_DEPT_ID = "maintenance_dept_id";
    public static final String ASSET_FAULT_REASON_ID = "asset_fault_reason_id";
    public static final String ASSET_FAULT_REASON = "asset_fault_reason";
    public static final String ASSET_FAULT_SOLUTION = "asset_fault_solution";
    public static final String EXPENSE = "expense";
    public static final String EXPENSE_INFO = "expense_info";
    public static final String ATTACHMENTS = "attachments";
    public static final String IMAGES = "images";
    public static final String FAULT_TYPE = "fault_type";
    public static final String RESOLVE_TYPE = "resolve_type";
    public static final String STATUS = "status";
    public static final String ESTIMATE_FIX_TIME = "estimate_fix_time";
    public static final String IS_DELAY_RESOLVE = "is_delay_resolve";
    public static final String DELAY_DAY_NUM = "delay_day_num";
    public static final String DELAY_REASON = "delay_reason";
    public static final String LONGITUDE = "longitude";
    public static final String LATITUDE = "latitude";
    public static final String REMARK = "remark";

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("faultResolveStageId", getFaultResolveStageId())
                .append("startTime", getStartTime())
                .append("endTime", getEndTime())
                .append("faultResolveUserId", getFaultResolveUserId())
                .append("maintenanceDeptId", getMaintenanceDeptId())
                .append("assetFaultReasonId", getAssetFaultReasonId())
                .append("assetFaultReason", getAssetFaultReason())
                .append("assetFaultSolution", getAssetFaultSolution())
                .append("expense", getExpense())
                .append("expenseInfo", getExpenseInfo())
                .append("attachments", getAttachments())
                .append("images", getImages())
                .append("faultType", getFaultType())
                .append("resolveType", getResolveType())
                .append("status", getStatus())
                .toString();
    }
}
